package edu.whut.test;
/*
    将String s = "10,20,3,0,50"转换为整数并存入数组，输出最大值
 */
public class IntegerTest01 {
    public static void main(String[] args) {
        String str = "10,20,30,40,50";

        String[] s = str.split(",");

        int[] nums = new int[s.length];

        for (int i = 0; i < s.length; i++) {
            nums[i] = Integer.parseInt(s[i]);
        }

        for (int i = 0; i < nums.length; i++) {
            System.out.println(nums[i]);
        }
    }


}
